package com.kucun.Dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.kucun.bean.Billmaster;
import com.kucun.bean.Page;
import com.kucun.bean.Billmaster;

public interface BillmasterMapper {
	     boolean delete(@Param("id")String id);
 
	    boolean insert(Billmaster billmaster);

	    int insertSelective(Billmaster billmaster);

	    Billmaster selectByPrimaryKey(Integer id);
	    
	    List<Billmaster> findAll(Page page);
	     
	    int updateByPrimaryKeySelective(Billmaster billmaster);

	    boolean updateByPrimaryKey(Billmaster billmaster);
	    
	    List<Billmaster> query(Billmaster billmaster,@Param("i")int i,@Param("rows")int rows);
	    
	    Page queryCount(Billmaster billmaster);
	    
	    Integer getid();
	    
		Page getCount(Page page);
		Page getmaxid(String billtype);
		Page getCountOfOutOrder(Page page);
        //得到出库单列表
		List<Billmaster> findAllOutofOrder(Page page1);
		/**返回主键ID**/
		int insertBillmaster(Billmaster billmaster);
		/*******出库单变跟数据状态******/
		int updateBillmasterToSubmit(@Param("id")String id);
		/*******入库库单变跟数据状态******/
		int updateBillmasterToSubmitOfInCome(@Param("id")String id);
		
		/**
		 * 获取流水号
		 * @param prefix  前缀
		 * @param digit    生成位数
 		 * @param orderNo 新单据编号
		 * @return
		 */
		@SuppressWarnings("rawtypes")
		String generate_orderNo(Map map);
}